<?php

/**
 * Created by PhpStorm.
 * User: dumbledore
 * Date: 2018/3/7
 * Time: 下午5:34
 */
class Api_model extends CI_Model
{

    public function __construct()
    {
        $this->load->database();
        $this->load->model("bill_model");
    }

    /*
    * 审批订单 邮箱格式
    * $email 邮箱地址
    * $title email 主题:
    * $content email内容
    * $id 收件人id
    * $customer_id 发件人id
    */
    public function send_email_public($email,$title,$content)
    {
        if (!empty($email)) {
            $sender_name = ''; //发邮件人的地址
            $code        = ''; //验证码
            $to_email    = $email; //收件人 email 地址
            $title       = $title; // email 主题:
            $content     = $content;
            $res         = $this->bill_model->send_email($sender_name, $to_email, $title, $content, $mailtype = 'html'); //发送email
            if ($res == true) {
                return true;
            } else {
                return false;
            }
        }
    }
    


}